package com.netistate.pojo;

import java.util.List;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="t_projectservices")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class ProjectServices {
	
	private int id;
	private String ServiceName;
	private String ServiceNo;
	private String supportDate;
	private String address;
	private float hours;
	private String ourPeople;
	private String otherPeople;
	private String serviceType;
	private String createtime;
	
	private Project project;
	
	private Set<Doc> docList;
	
	private List<ProjectServiceDetail> projectServiceDetail;
	
	@OneToMany(mappedBy="projectServices")
	public List<ProjectServiceDetail> getProjectServiceDetail() {
		return projectServiceDetail;
	}
	public void setProjectServiceDetail(
			List<ProjectServiceDetail> projectServiceDetail) {
		this.projectServiceDetail = projectServiceDetail;
	}
	@OneToMany(mappedBy="projectServices",cascade={CascadeType.ALL},fetch=FetchType.LAZY)
	public Set<Doc> getDocList() {
		return docList;
	}
	public void setDocList(Set<Doc> docList) {
		this.docList = docList;
	}
	@ManyToOne
	@JoinColumn(name="projectid")
	public Project getProject() {
		return project;
	}
	
	
	public void setProject(Project project) {
		this.project = project;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getServiceName() {
		return ServiceName;
	}
	public void setServiceName(String serviceName) {
		ServiceName = serviceName;
	}
	public String getSupportDate() {
		return supportDate;
	}
	public void setSupportDate(String supportDate) {
		this.supportDate = supportDate;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getOurPeople() {
		return ourPeople;
	}
	public void setOurPeople(String ourPeople) {
		this.ourPeople = ourPeople;
	}
	public String getOtherPeople() {
		return otherPeople;
	}
	public void setOtherPeople(String otherPeople) {
		this.otherPeople = otherPeople;
	}
	public String getServiceType() {
		return serviceType;
	}
	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}
	public float getHours() {
		return hours;
	}
	public void setHours(float hours) {
		this.hours = hours;
	}
	public String getServiceNo() {
		return ServiceNo;
	}
	public void setServiceNo(String serviceNo) {
		ServiceNo = serviceNo;
	}
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	


	
	
	
	

}
